<?php

namespace app\models\role;

use Yii;

/**
 * This is the model class for table "role_menu".
 *
 * @property int $id
 * @property string $name
 */
class RoleMenu extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'role_menu';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['name', 'url'], 'string', 'max' => 255],
            [['url'], 'unique', 'message' => '链接不能重复']
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
        ];
    }
}
